package com.event.ingestion.data;

import com.event.ingestion.common.Parsable;

public abstract class EventAttendeesParser <T> implements Parsable<T> {
    @Override
    public Boolean isHeader(String[] fields) {
        return (isValid(fields) && fields[0].equals("event_id") && fields[1].equals("user_id") && fields[2].equals("attend_type"));
    }

    @Override
    public Boolean isValid(String[] fields) {
        return (fields.length > 2 && !isEmpty(fields,new int[]{0,1,2}));
    }

}